#!/bin/sh
git submodule update --remote &&
cd tools/builder &&
make &&
cd ../.. &&
tools/builder/obj/builder > Makefile &&
echo 'Makefile generated' &&
mkdir -p target/ &&
bear -o target/cdb.json make $* -B &&
echo 'compile_commands.json generated'